package br.usp.ime.ingpos.web.controllers;

import java.util.List;

import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.Validator;
import br.usp.ime.ingpos.modelo.ProcessoSeletivo;
import br.usp.ime.ingpos.modelo.TipoPerfil;
import br.usp.ime.ingpos.services.ProcessoSeletivoService;
import br.usp.ime.ingpos.web.interceptors.RestrictAccessPerfil;

@Resource
public class CalendarioController
{
    private Result result;
    private Validator validator;
    private UsuarioSessao usuarioSessao;
    private ProcessoSeletivoService processoSeletivoService;

    public CalendarioController(
        final Result result,
        final Validator validator,
        final UsuarioSessao usuarioSessao,
        final ProcessoSeletivoService processoSeletivoService )
    {
        this.result = result;
        this.validator = validator;
        this.usuarioSessao = usuarioSessao;
        this.processoSeletivoService = processoSeletivoService;
    }

    @Get
    @Path( "/calendario" )
    public void calendario()
    {
        List<ProcessoSeletivo> processosSeletivosVigentes = processoSeletivoService.buscarProcessosSeletivosVigentes();
        result.include( "processosSeletivosVigentes", processosSeletivosVigentes );
    }
}
